Stefan Kangas [Thu, 19 Nov 2020 21:10:20 +0000 (22:10 +0100)]
compile-async: Don't error out on deferred compilation after load
* lisp/emacs-lisp/comp.el (native-compile-async): Update
comp-files-queue when deferred compilation is requested. (Bug#44676)
Stefan Kangas [Fri, 20 Nov 2020 19:34:32 +0000 (20:34 +0100)]
; Fix trivial typos
Andrea Corallo [Thu, 19 Nov 2020 23:59:00 +0000 (00:59 +0100)]
Add 'EMACSNATIVELOADPATH' env variable support (bug#44726)
* lisp/startup.el (normal-top-level): Read 'EMACSNATIVELOADPATH'
and add entries too `comp-eln-load-path'.
* lisp/mail/emacsbug.el (report-emacs-bug): Dump
also 'EMACSNATIVELOADPATH'.
Andrea Corallo [Wed, 18 Nov 2020 16:50:03 +0000 (17:50 +0100)]
* Fix eln file hasing for symlink paths (bug#44701)
* src/comp.c (Fcomp_el_to_eln_filename): Call `file-truename'
in place of `expand-file-name' when available.
Jonas Bernoulli [Wed, 18 Nov 2020 17:13:31 +0000 (18:13 +0100)]
Revert "[WIP] Add and improve section headings"
This reverts commit
007a5a677573ab628426a0605eb38f8e68fe1953.
Jonas Bernoulli [Wed, 18 Nov 2020 17:13:27 +0000 (18:13 +0100)]
Revert "[TODO] Remove noisy anti-noise feature"
This reverts commit
c36b4eed2d76f0e804d27d35dd6281f858639f94.
Jonas Bernoulli [Wed, 18 Nov 2020 14:18:07 +0000 (15:18 +0100)]
[TODO] Remove noisy anti-noise feature
Jonas Bernoulli [Wed, 18 Nov 2020 13:08:42 +0000 (14:08 +0100)]
[WIP] Add and improve section headings
Stefan Kangas [Mon, 16 Nov 2020 02:50:10 +0000 (03:50 +0100)]
Various doc fixes for comp.el and comp.c
* lisp/emacs-lisp/comp.el: Remove redundant :group args.
(comp-async-cu-done-hook, comp-async-all-done-hook)
(comp-async-env-modifier-form, comp-dry-run)
(comp-ensure-native-compiler, comp-func-ret-typeset)
(comp-func-ret-range, comp-limple-lock-keywords)
(comp-make-curr-block):
* src/comp.c (Fcomp_el_to_eln_filename, Fcomp__init_ctxt)
(Fcomp_native_driver_options_effective_p)
(Fcomp__compile_ctxt_to_file, Fcomp_libgccjit_version)
(Fcomp__register_lambda, Fcomp__register_subr)
(Fcomp__late_register_subr, Fnative_elisp_load, syms_of_comp): Doc fixes.
Andrea Corallo [Sun, 15 Nov 2020 22:31:00 +0000 (23:31 +0100)]
Fix nativecomp cond-rw pass
* lisp/emacs-lisp/comp.el (comp-mvar-symbol-p): Improve it.
(comp-cond-rw-func): Fix logic for multiple predecessor on target
block.
* test/src/comp-tests.el (comp-test-cond-rw-1): New test.
* test/src/comp-test-funcs.el (comp-test-cond-rw-1-1-f)
(comp-test-cond-rw-1-2-f): New functions.
Andrea Corallo [Sun, 15 Nov 2020 11:03:59 +0000 (12:03 +0100)]
* Improve `comp-fwprop-call'
* lisp/emacs-lisp/comp.el (comp-function-call-maybe-fold):
Document return value.
(comp-fwprop-call): Simplify and improve.
Andrea Corallo [Sat, 14 Nov 2020 22:22:57 +0000 (23:22 +0100)]
* Add more type specifiers
* lisp/emacs-lisp/comp.el (comp-known-type-specifiers): Add more
pure functions.
Andrea Corallo [Sat, 14 Nov 2020 21:07:54 +0000 (22:07 +0100)]
Merge remote-tracking branch 'savannah/master' into dev
Andrea Corallo [Sat, 14 Nov 2020 16:38:05 +0000 (17:38 +0100)]
Add `comp-constraint-to-type-spec' and better handle boolean type spec
* lisp/emacs-lisp/comp.el (comp-constraint-to-type-spec): New
function splitting out code from comp-ret-type-spec + better
handle boolean type specifier.
(comp-ret-type-spec): Rework to leverage
`comp-constraint-to-type-spec'.
* test/src/comp-tests.el (comp-tests-type-spec-tests): Add a
testcase.
Andrea Corallo [Sat, 14 Nov 2020 15:45:50 +0000 (16:45 +0100)]
Handle correctly quoting in *Native-compile-Log* buffer
* lisp/emacs-lisp/comp.el (comp-log): Add `quoted' parameter and
pass it to `comp-log-to-buffer'.
(comp-log-to-buffer): Add `quoted' parameter and leverage `prin1'
or `princ' accordingly.
Andrea Corallo [Sat, 14 Nov 2020 15:25:56 +0000 (16:25 +0100)]
* Split logic into comp-fwprop-call and improve it
* lisp/emacs-lisp/comp.el (comp-func-ret-valset)
(comp-fwprop-call): New functions.
(comp-fwprop-insn): Remove code duplicaiton and call
`comp-fwprop-call'.
Andrea Corallo [Sat, 14 Nov 2020 10:24:30 +0000 (11:24 +0100)]
* Fix debug symbol emission
* src/comp.c (Fcomp__compile_ctxt_to_file): Now that we do not
rely anymore on globlal variables move logic in from
'Fcomp__init_ctxt' so comp.debug is already set correctly.
Andrea Corallo [Sat, 14 Nov 2020 15:55:39 +0000 (16:55 +0100)]
* Add a number of type specifiers for pure function
* lisp/emacs-lisp/comp.el (comp-known-type-specifiers): Add 60
pure function type specifiers.
Andrea Corallo [Thu, 12 Nov 2020 16:27:31 +0000 (17:27 +0100)]
Characterize functions in terms of type specifiers
* lisp/emacs-lisp/comp.el (comp-known-type-specifiers): New const
in place of `comp-known-ret-types' and `comp-known-ret-ranges'.
(comp-constraint): New struct to separate the constraint side of
an mvar.
(comp-constraint-f): Analogous for functions.
(comp-mvar): Rework and include `comp-constraint'.
(comp-type-spec-to-constraint): New function.
(comp-known-constraints-h): New const.
(comp-func-ret-typeset, comp-func-ret-range): Rework.
(comp-fwprop-insn): Fix.
* test/src/comp-tests.el (destructure-type-spec): New testcase.
Juri Linkov [Sat, 14 Nov 2020 20:36:13 +0000 (22:36 +0200)]
* lisp/progmodes/xref.el (xref-goto-xref): Prefix arg quits the *xref* buffer.
(bug#44611)
Juri Linkov [Sat, 14 Nov 2020 20:18:38 +0000 (22:18 +0200)]
* lisp/org/ob-ruby.el (org-babel-ruby-initiate-session): Use :ruby header arg.
Allow specification of ruby command using the :ruby header arg.
https://lists.gnu.org/archive/html/emacs-orgmode/2020-11/msg00166.html
Daniel Lenski [Sat, 14 Nov 2020 16:07:49 +0000 (17:07 +0100)]
Fix `speedbar-directory-buttons' when using Tramp
* lisp/speedbar.el (speedbar-directory-buttons): Make speedbar
work with directories accessed via Tramp (bug#44622).
Copyright-paperwork-exempt: yes
Stefan Kangas [Sat, 14 Nov 2020 16:04:23 +0000 (17:04 +0100)]
Don't quote lambdas in several places
* lisp/align.el (align-highlight-rule):
* lisp/bookmark.el (bookmark-maybe-sort-alist):
* lisp/emacs-lisp/advice.el (ad-read-advice-name)
(ad-retrieve-args-form, ad-make-hook-form, defadvice)
(ad-with-originals):
* lisp/foldout.el (foldout-inhibit-key-bindings):
* lisp/gnus/gnus-bookmark.el (gnus-bookmark-maybe-sort-alist):
* lisp/mail/rfc822.el (rfc822-addresses-1):
* lisp/net/eudcb-ldap.el (eudc-ldap-cleanup-record-simple):
* lisp/net/net-utils.el (network-connection-to-service):
* lisp/net/socks.el (socks-build-auth-list):
* lisp/org/ox-odt.el (org-odt--image-size):
* lisp/pcomplete.el (pcomplete-command-completion-function)
(pcomplete-default-completion-function, pcomplete-opt):
* lisp/progmodes/cperl-mode.el (cperl-highlight-charclass)
(cperl-tags-hier-init, cperl-tags-treeify)
(cperl-next-interpolated-REx, cperl-time-fontification):
* lisp/shadowfile.el (shadow-copy-files, shadow-shadows-of-1)
(shadow-save-buffers-kill-emacs):
* lisp/strokes.el (strokes-renormalize-to-grid):
* lisp/tempo.el (tempo-insert, tempo-forward-mark)
(tempo-backward-mark):
* lisp/textmodes/artist.el (artist-submit-bug-report):
* lisp/textmodes/ispell.el (ispell-complete-word):
* lisp/url/url-auth.el (url-get-authentication):
* lisp/url/url-cache.el (url-cache-create-filename-human-readable):
* lisp/vcursor.el (vcursor-find-window):
* test/lisp/textmodes/reftex-tests.el
(reftex-parse-bibtex-entry-test): Don't quote lambdas.
Akira Kyle [Sat, 14 Nov 2020 15:39:41 +0000 (16:39 +0100)]
Work around glib messing with signal handlers more than it should
* src/process.c (init_process_emacs): force glib's g_unix_signal
handler into lib_child_handler where it should belong.
Copyright-paperwork-exempt: yes
Pablo Barbáchano [Sat, 14 Nov 2020 15:24:26 +0000 (16:24 +0100)]
Add an option to preserve ANSI sequences
* lisp/ansi-color.el Add an option to preserve the ANSI sequences
* test/lisp/ansi-color-tests.el: Add tests (bug#44589).
Lars Ingebrigtsen [Sat, 14 Nov 2020 15:17:44 +0000 (16:17 +0100)]
project-or-external-find-file doc string fix
* lisp/progmodes/project.el (project-or-external-find-file): Doc
string fix -- it's not "recognizing" file names (bug#44588).
Stefan Kangas [Sat, 14 Nov 2020 14:55:08 +0000 (15:55 +0100)]
Use lexical-binding in fortune.el and add tests
* lisp/play/fortune.el: Use lexical-binding. Remove redundant
:group args.
(fortune-in-buffer): Quote function symbol as such.
* test/lisp/play/fortune-resources/fortunes:
* test/lisp/play/fortune-tests.el: New files.
* .gitignore: Ignore generated file fortunes.dat.
Eli Zaretskii [Sat, 14 Nov 2020 13:02:13 +0000 (15:02 +0200)]
Make Calc windows dedicated by default
* lisp/calc/calc.el (calc-make-windows-dedicated): New defcustom.
(calc, calc-trail-display): Set Calc windows dedicated if
calc-make-windows-dedicated is non-nil. Patch by Boruch Baum
<boruch_baum@gmx.com>. (Bug#44108)
* etc/NEWS (Calc): Announce the new behavior.
Eli Zaretskii [Sat, 14 Nov 2020 12:43:42 +0000 (14:43 +0200)]
Make 'prefer-utf-8' heed inhibit-*-detection variables
* lisp/international/mule-conf.el (prefer-utf-8): Inhibit
detection of null bytes and ISO escape sequences if the respective
inhibit-*-detection variables say so. (Bug#44486)
Eli Zaretskii [Sat, 14 Nov 2020 12:36:34 +0000 (14:36 +0200)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Jared Finder [Fri, 6 Nov 2020 05:15:08 +0000 (21:15 -0800)]
* lisp/faces.el (mode-line-highlight): Use :box only when supported.
Philipp Stephani [Sat, 14 Nov 2020 12:30:53 +0000 (13:30 +0100)]
Capitalize portable dump messages.
We capitalize all other messages during the dump, so capitalize the
"dump mode" and "dumping fingerprint" ones as well for consistency.
* src/pdumper.c (Fdump_emacs_portable): Capitalize fingerprint message
prefix.
* lisp/loadup.el: Capitalize "dump mode" message.
Jared Finder [Sun, 1 Nov 2020 05:25:47 +0000 (21:25 -0800)]
Face-changing text properties and help-echo now work with xterm-mouse.
* src/dispnew.c (update_mouse_position): New function for mouse
movement logic in 'handle_one_term_event' that can be shared across
different mouse backends.
(display--update-for-mouse-movement): New lisp function, call it.
* lisp/xt-mouse.el (xterm-mouse--handle-mouse-movement): New function
that calls 'display--update-for-mouse-movement'.
(xterm-mouse-translate-1): Call it.
* src/term.c (handle_one_term_event): Inline logic from
'term_mouse_movement' and call 'update_mouse_position'.
(term_mouse_movement): Delete.
Eric Abrahamsen [Wed, 11 Nov 2020 18:48:37 +0000 (10:48 -0800)]
Save instantiated gnus-search engines in an alist
So we aren't re-instantiating (and potentially configuring) them with
every search.
* lisp/gnus/gnus-search.el (gnus-search-engine-instance-alist): New
variable holding server->engine mapping.
(gnus-search-server-to-engine): See if we've already instantiated this
server. If so, return it. If not, instantiate it and save in the above
variable.
(gnus-search-shutdown): Shutdown function clearing the above alist.
Eric Abrahamsen [Fri, 13 Nov 2020 04:02:09 +0000 (20:02 -0800)]
Make sure Gnus search groups search topics recursively
* lisp/gnus/gnus-group.el (gnus-group-make-search-group,
gnus-group-read-ephemeral-search-group): If a search is initiated from
a topic line, make sure we get all the groups under that topic (and
under sub-topics).
Mattias Engdegård [Fri, 13 Nov 2020 16:42:27 +0000 (17:42 +0100)]
Simplify quick-check composition regexps
* lisp/international/ucs-normalize.el
(quick-check-composition-list-to-regexp): Don't add an explicit
pattern for U+1161..U+1175 and U+11a8..U+11c2 since these are already
part of `combining-chars'.
Glenn Morris [Fri, 13 Nov 2020 17:00:26 +0000 (09:00 -0800)]
Merge from origin/emacs-27
a3d316bbb7 (origin/emacs-27) Update information about refcards
f43e9ad524 Avoid crashes in the daemon due to user interaction
Glenn Morris [Fri, 13 Nov 2020 17:00:26 +0000 (09:00 -0800)]
; Merge from origin/emacs-27
The following commit was skipped:
658952a57a Some minor changes to Tramp, do not merge with master
Glenn Morris [Fri, 13 Nov 2020 17:00:26 +0000 (09:00 -0800)]
Merge from origin/emacs-27
ac1a2b2160 Add more doc-view requirements
109eb1e7e2 Fix undefined behavior when fetching glyphs from the displ...
# Conflicts:
# lisp/doc-view.el
Glenn Morris [Fri, 13 Nov 2020 16:58:06 +0000 (08:58 -0800)]
; Merge from origin/emacs-27
The following commit was skipped:
78e1646bf7 Fix pcase rx form snag with '?' and '??' (bug#44532)
Glenn Morris [Fri, 13 Nov 2020 16:58:06 +0000 (08:58 -0800)]
Merge from origin/emacs-27
75384bd155 Update the doc-view header line
13ab70c80e Avoid breaking Arabic shaping in 'window-text-pixel-size'
e693d97e50 doc-view.el comment clarification
968e85a2ce Update erc documentation about C-c C-b
Alan Third [Tue, 10 Nov 2020 12:54:50 +0000 (12:54 +0000)]
Fix error with fn key in NS port (bug#44533)
* src/nsterm.m ([EmacsView keyDown:]): Move the correction for fn key
handling to before the modifiers are calculated.
Michael Albinus [Fri, 13 Nov 2020 15:55:08 +0000 (16:55 +0100)]
Some minor Tramp fixes, resulting from test campaign
* lisp/net/tramp.el (tramp-handle-write-region):
* lisp/net/tramp-adb.el (tramp-adb-handle-write-region):
* lisp/net/tramp-sh.el (tramp-sh-handle-write-region):
* lisp/net/tramp-smb.el (tramp-smb-handle-write-region): Use `current-time'
if needed.
* lisp/net/tramp-gvfs.el (tramp-gvfs-gio-mapping):
(tramp-gvfs-do-copy-or-rename-file): Remove "gvfs-rename", it is
not trustworthy.
* test/lisp/net/tramp-tests.el (tramp-test07-file-exists-p): Check also for
symlinked files in trash.
(tramp-test20-file-modes): Revert last change, it was a thinko.
Eli Zaretskii [Fri, 13 Nov 2020 07:10:01 +0000 (09:10 +0200)]
Update information about refcards
* admin/release-process (refcards):
* admin/make-tarball.txt (refcards): Update information about
generating refcards and required TeX/LaTeX packages.
Andrea Corallo [Thu, 12 Nov 2020 22:41:04 +0000 (23:41 +0100)]
Add copy insn testcase
* test/src/comp-tests.el (copy-insn): New testcase.
* test/src/comp-test-funcs.el (comp-test-copy-insn-f): New
function.
Andrea Corallo [Thu, 12 Nov 2020 22:38:01 +0000 (23:38 +0100)]
* lisp/emacs-lisp/comp.el (comp-mvar-value-vld-p): Fix logic.
Andrea Corallo [Thu, 12 Nov 2020 20:59:59 +0000 (21:59 +0100)]
* Memoize `comp-common-supertype'
* lisp/emacs-lisp/comp.el (comp-ctxt): Add `common-supertype-mem'
slot.
(comp-common-supertype): Memoize.
Andrea Corallo [Thu, 12 Nov 2020 14:11:58 +0000 (15:11 +0100)]
* Add few more type specifier tests
* test/src/comp-tests.el (comp-tests-type-spec-tests): Add three
tests and uncomment one.
Andrea Corallo [Thu, 12 Nov 2020 14:08:58 +0000 (15:08 +0100)]
* Rework `comp-ret-type-spec' in terms of `comp-phi'
* lisp/emacs-lisp/comp.el (comp-ret-type-spec): Use `comp-func'
not to duplicate logic plus add null type specifier support and
some comments.
Andrea Corallo [Thu, 12 Nov 2020 14:08:44 +0000 (15:08 +0100)]
* Move phi function code into dedicated function and improve it
* lisp/emacs-lisp/comp.el (comp-phi): New function moving logic
from `comp-fwprop-insn'.
Stefan Kangas [Thu, 12 Nov 2020 21:06:47 +0000 (22:06 +0100)]
Don't quote lambdas in several places
* lisp/allout-widgets.el (allout-widgets-adjusting-message)
(allout-widgets-exposure-change-processor)
(allout-widgets-count-buttons-in-region):
* lisp/ansi-color.el (ansi-color-make-color-map):
* lisp/case-table.el (describe-buffer-case-table):
* lisp/emacs-lisp/byte-opt.el (byte-decompile-bytecode-1):
* lisp/gnus/gnus-agent.el (gnus-agent-regenerate-group):
* lisp/gnus/nnir.el (nnir-run-swish++, nnir-run-swish-e)
(nnir-run-hyrex, nnir-run-namazu):
* lisp/hippie-exp.el (make-hippie-expand-function)
(try-complete-lisp-symbol, try-complete-lisp-symbol-partially)
(try-expand-all-abbrevs):
* lisp/international/mule-cmds.el (sort-coding-systems)
(select-safe-coding-system, select-message-coding-system)
(read-language-name, encoded-string-description):
* lisp/international/quail.el (quail-keyseq-translate)
(quail-get-translations, quail-build-decode-map)
(quail-insert-decode-map):
* lisp/jka-compr.el (jka-compr-uninstall):
* lisp/locate.el (locate-in-alternate-database):
* lisp/mail/mailabbrev.el (mail-resolve-all-aliases-1)
(mail-abbrev-make-syntax-table):
* lisp/mh-e/mh-seq.el (mh-read-folder-sequences):
* lisp/net/eudcb-ldap.el (eudc-ldap-simple-query-internal):
* lisp/progmodes/make-mode.el (makefile-query-targets)
(makefile-prompt-for-gmake-funargs):
* lisp/shadowfile.el (shadow-cancel, shadow-shadows-of):
* lisp/sort.el (sort-pages, sort-fields, sort-regexp-fields):
* lisp/subr.el (listify-key-sequence):
* lisp/term/wyse50.el (terminal-init-wyse50):
* lisp/textmodes/ispell.el (ispell-help)
(ispell-begin-tex-skip-regexp):
* lisp/textmodes/page-ext.el (pages-sort-region):
* lisp/textmodes/refer.el (refer-find-entry-in-file):
* lisp/url/url-expand.el (url-expand-file-name): Don't quote lambdas.
Juri Linkov [Thu, 12 Nov 2020 20:33:27 +0000 (22:33 +0200)]
Add help-char to the cache key in read-char-from-minibuffer as well
It's highly unlikely that help-char will be changed from its default value 8,
but formally there is a dependence on help-char.
Robert Pluim [Thu, 12 Nov 2020 15:51:49 +0000 (16:51 +0100)]
Emit required version when Harfbuzz is not found but Cairo is
* configure.ac: Define harfbuzz_required_ver with required
harfbuzz version, and put it in the warning message emitted when
Cairo is found but not HarfBuzz.
Mattias Engdegård [Thu, 12 Nov 2020 09:39:36 +0000 (10:39 +0100)]
vhdl-mode: remove minor obstacle to static checking
* lisp/progmodes/vhdl-mode.el (vhdl-directive-keywords-regexp):
Remove unnecessary global variable.
(vhdl-words-init): Remove assignment.
(vhdl-font-lock-init): Inline expression. Use regexp-opt.
Lars Ingebrigtsen [Thu, 12 Nov 2020 12:39:40 +0000 (13:39 +0100)]
Remove mention of `edebug-on-signal' from a doc string
* lisp/emacs-lisp/edebug.el (edebug-mode): Don't mention
non-existent user option (bug#44577).
Lars Ingebrigtsen [Thu, 12 Nov 2020 12:36:19 +0000 (13:36 +0100)]
Clarify project-find-file doc string
* lisp/progmodes/project.el (project-find-file): Don't say
anything about recognizing file names, as that may lead the user
to think that it'll check whether the string at point is an
existing file (bug#44588).
Juri Linkov [Thu, 12 Nov 2020 07:38:21 +0000 (09:38 +0200)]
Add help-form to the cache key in read-char-from-minibuffer
Stefan Kangas [Thu, 12 Nov 2020 02:27:26 +0000 (03:27 +0100)]
* test/lisp/help-fns-tests.el: Silence byte-compiler.
Stefan Kangas [Thu, 12 Nov 2020 02:20:39 +0000 (03:20 +0100)]
* test/lisp/hfy-cmap-resources/rgb.txt: Add comment line.
Stefan Kangas [Thu, 12 Nov 2020 01:55:02 +0000 (02:55 +0100)]
Remove redundant installation instructions
* lisp/net/newsticker.el:
* lisp/net/sieve-mode.el:
* lisp/play/bubbles.el:
* lisp/play/handwrite.el:
* lisp/progmodes/python.el:
* lisp/progmodes/ruby-mode.el:
* lisp/whitespace.el: Remove redundant installation instructions.
These packages are distributed with Emacs and/or GNU ELPA.
* lisp/calendar/timeclock.el:
* lisp/ehelp.el:
* lisp/emacs-lisp/checkdoc.el:
* lisp/filesets.el:
* lisp/mail/reporter.el:
* lisp/net/rfc2104.el:
* lisp/net/webjump.el:
* lisp/pixel-scroll.el: Remove redundant recommendation to call
require before using autoloaded functions.
* lisp/tar-mode.el: Remove reference to package uncompress, removed in
Emacs 23.
Stefan Kangas [Thu, 12 Nov 2020 01:28:10 +0000 (02:28 +0100)]
* lisp/progmodes/ruby-mode.el (auto-mode-alist): Add Brewfile.
Stefan Kangas [Mon, 9 Nov 2020 21:23:04 +0000 (22:23 +0100)]
Fix mistake in describe-buffer-bindings
* src/keymap.c (Fdescribe_buffer_bindings): Fix a call in
describe-buffer-bindings. This fixes a mistake in my previous commit
to prefer the Lisp version of describe-map-tree (
8a1441310aa1), where
0 was accidentally converted to Qt in two places.
Juri Linkov [Thu, 12 Nov 2020 01:38:44 +0000 (03:38 +0200)]
Use cache with help-char in read-char-from-minibuffer unless help-form is nil
Andrea Corallo [Wed, 11 Nov 2020 16:59:46 +0000 (17:59 +0100)]
* Nativecomp testsuite rework for derived return type specifiers
As we have derived return type specifiers as some test for them. Also
rewrite some propagation related test using return type specifiers too
as it's way more convenient.
* test/src/comp-tests.el (fw-prop-1): Nit rename.
(comp-tests-check-ret-type-spec): New function.
(comp-tests-type-spec-tests): New variable.
(comp-tests-cond-rw-0-var) Remove variable.
(cond-rw-0, cond-rw-1, cond-rw-2, cond-rw-3, cond-rw-4, cond-rw-5)
Remove tests as now covered by `comp-tests-check-ret-type-spec'.
Andrea Corallo [Wed, 11 Nov 2020 16:23:25 +0000 (17:23 +0100)]
* Add nativecomp derived return type specifier computation support
* lisp/emacs-lisp/comp.el (comp-post-pass-hooks): Nit.
(comp-func): Add `ret-type-specifier' slot.
(comp-ret-type-spec): New function.
(comp-final): Call `comp-ret-type-spec'.
Andrea Corallo [Wed, 11 Nov 2020 14:54:58 +0000 (15:54 +0100)]
* Unline some functions to optimize bootstrap time
* lisp/emacs-lisp/comp.el (comp-mvar-value-vld-p)
(comp-mvar-value, comp-mvar-fixnum-p, comp-set-op-p)
(comp-assign-op-p, comp-call-op-p, comp-type-hint-p)
(comp-func-ret-typeset, comp-function-pure-p)
(comp-alloc-class-to-container, comp-lex-byte-func-p)
(comp-lap-eob-p, comp-lap-fall-through-p, comp-emit)
(comp-emit-set-call, comp-mvar-propagate)
(comp-function-foldable-p, comp-function-call-maybe-fold)
(comp-trampoline-filename): Uninline functions.
Andrea Corallo [Tue, 10 Nov 2020 17:58:56 +0000 (18:58 +0100)]
* Add to elisp-mode `emacs-lisp-native-compile-and-load'
* lisp/progmodes/elisp-mode.el
(emacs-lisp--before-compile-buffer): New function.
(emacs-lisp-byte-compile-and-load): Use the previous.
(emacs-lisp-native-compile-and-load): New function.
Andrea Corallo [Sun, 8 Nov 2020 11:16:34 +0000 (12:16 +0100)]
* Fix limple-mode for new type and range limple semantic
* lisp/emacs-lisp/comp.el (comp-limple-branches, comp-limple-ops):
New variables.
(comp-limple-lock-keywords): Update value.
Andrea Corallo [Wed, 11 Nov 2020 15:17:03 +0000 (16:17 +0100)]
Add a nativecomp testcase
Having this while re-debugging the boostrap would have saved few hours
of debug so let's add it.
* test/src/comp-tests.el (and-3): Add test.
* test/src/comp-test-funcs.el (comp-test-and-3-var): New var.
(comp-test-and-3-f): New function.
Andrea Corallo [Sat, 7 Nov 2020 20:47:30 +0000 (21:47 +0100)]
Add initial nativecomp typeset and range propagation support
This commit add an initial support for a better type propagation and
integer range propagation.
Each mvar can be now characterized by a set of types, a set of values
and an integral range.
* lisp/emacs-lisp/comp.el (comp-known-ret-types): Store into
typeset and remove fixnum.
(comp-known-ret-ranges, comp-type-predicates): New variables.
(comp-ctxt): Remove supertype-memoize slot and add
union-typesets-mem.
(comp-mvar): Remove const-vld, constant, type slots. Add typeset,
valset, range slots.
(comp-mvar-value-vld-p, comp-mvar-value, comp-mvar-fixnum-p)
(comp-mvar-symbol-p, comp-mvar-cons-p)
(comp-mvar-type-hint-match-p, comp-func-ret-typeset)
(comp-func-ret-range): New functions.
(make-comp-mvar, make-comp-ssa-mvar): Update logic.
(comp--typeof-types): New variable.
(comp-supertypes, comp-common-supertype): Logic update.
(comp-subtype-p, comp-union-typesets, comp-range-1+)
(comp-range-1-, comp-range-<, comp-range-union)
(comp-range-intersection): New functions.
(comp-fwprop-prologue, comp-mvar-propagate)
(comp-function-foldable-p, comp-function-call-maybe-fold)
(comp-fwprop-insn, comp-call-optim-func, comp-finalize-relocs):
Logic update.
* src/comp.c (emit_mvar_rval, emit_call_with_type_hint)
(emit_call2_with_type_hint): Logic update.
* lisp/emacs-lisp/cl-preloaded.el (cl--typeof-types): Undo the add
of fixnum and bignum as unnecessary.
* test/src/comp-tests.el
(comp-tests-mentioned-p-1, comp-tests-cond-rw-checker-val)
(comp-tests-cond-rw-checker-type, cond-rw-1, cond-rw-2)
(cond-rw-3, cond-rw-4, cond-rw-5): Update for new type interface.
(range-simple-union, range-simple-intersection): New integer range
tests.
(union-types): New union type test.
Andrea Corallo [Sun, 8 Nov 2020 09:40:05 +0000 (10:40 +0100)]
* Rename two nativecomp functions
* lisp/emacs-lisp/comp.el (comp-function-foldable-p): Rename from
comp-function-optimizable-p.
(comp-function-call-maybe-fold): Same from
comp-function-call-maybe-fold.
Eli Zaretskii [Wed, 11 Nov 2020 19:46:43 +0000 (21:46 +0200)]
Avoid crashes in the daemon due to user interaction
* src/minibuf.c (read_minibuf): Avoid crashes in the daemon if the
init file invokes some kind of minibuffer interaction, by not
updating the selected frame if it's the initial frame.
(Bug#44583)
Juri Linkov [Wed, 11 Nov 2020 19:18:31 +0000 (21:18 +0200)]
In dired-query use read-char-from-minibuffer with bound help-char (bug#42708)
* lisp/dired-aux.el (dired-query): Replace read-char-choice call
with read-char-from-minibuffer.
* lisp/subr.el (read-char-choice): Restore the previous version
that uses read-key.
(read-char-from-minibuffer): Bind help-char to help-form-show
when help-form is non-nil.
Eric Abrahamsen [Wed, 11 Nov 2020 18:36:51 +0000 (10:36 -0800)]
Remove unused "internal" gnus-search variables
* lisp/gnus/gnus-search.el (gnus-search-memo-query,
gnus-search-memo-server): No longer needed.
Eric Abrahamsen [Wed, 11 Nov 2020 17:34:53 +0000 (09:34 -0800)]
Fix defgeneric name of gnus-search-index(ed)-extract
* lisp/gnus/gnus-search.el (gnus-search-indexed-extract): Had the
wrong name on the generic.
Michael Albinus [Wed, 11 Nov 2020 12:24:50 +0000 (13:24 +0100)]
Some minor changes to Tramp, do not merge with master
* lisp/net/tramp.el (tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes):
* lisp/net/tramp-adb.el
(tramp-adb-handle-directory-files-and-attributes):
* lisp/net/tramp-rclone.el (tramp-rclone-handle-directory-files):
* lisp/net/tramp-sh.el (tramp-sh-handle-directory-files-and-attributes):
* lisp/net/tramp-smb.el (tramp-smb-handle-directory-files): Add _COUNT.
Make the functions forward compatible.
* lisp/net/tramp-gvfs.el (tramp-gvfs-enabled):
Increase `max-specpdl-size' temporarily.
* test/lisp/net/tramp-tests.el (tramp--test-share-p): New defun.
(tramp-test05-expand-file-name-relative): Use it.
Dario Gjorgjevski [Wed, 11 Nov 2020 11:27:59 +0000 (12:27 +0100)]
Fix python-font-lock-keywords-maximum-decoration performance regression
* lisp/progmodes/python.el
(python-font-lock-keywords-maximum-decoration): `symbol-name'
should not be quantified by a `+' as it is redundant and performs
very badly (bug#44572).
Lars Ingebrigtsen [Wed, 11 Nov 2020 09:59:47 +0000 (10:59 +0100)]
Remove mention of global-cedet-m3-minor-mode
* lisp/cedet/semantic.el (semantic-submode-list):
(semantic-default-submodes): Remove mention of
global-cedet-m3-minor-mode, which no longer exists, apparently
(bug#44565).
Dario Gjorgjevski [Wed, 11 Nov 2020 09:49:04 +0000 (10:49 +0100)]
Fix font lock of assignments with type hints in Python
* lisp/progmodes/python.el
(python-font-lock-keywords-maximum-decoration): Fix regular
expressions for font lock of assignments with type hints (bug#44568).
The font lock of assignments with type hints in Python is rather bad.
Consider the following example:
from typing import Mapping, Tuple, Sequence
var1: int = 5
var2: Mapping[int, int] = {10: 1024}
var3: Mapping[Tuple[int, int], int] = {(2, 5): 32}
var4: Sequence[Sequence[int]] = [[1], [1, 2], [1, 2, 3]]
var5: Sequence[Mapping[str, Sequence[str]]] = [
{
'red': ['scarlet', 'vermilion', 'ruby'],
'green': ['emerald green', 'aqua']
},
{
'sword': ['cutlass', 'rapier']
}
]
As things stand right now, only ‘var1’ would be highlighted. To make
things worse, the ‘Mapping’ type hint of ‘var2’ would also be
highlighted, which is entirely incorrect.
This commit makes all of ‘var1’ through ‘var5’ be highlighted
correctly.
Harald Jörg [Wed, 11 Nov 2020 09:42:44 +0000 (10:42 +0100)]
Cleanup of the test file for cperl-mode
* test/lisp/progmodes/cperl-mode-tests.el
(cperl--run-test-cases): New macro, factored out from various
indentation / rewriting tests. Contains documentation of the
format used by the cperl-mode-resources files.
(cperl-test-bug-19709): Replace 'next-line' by 'forward-line'.
(cperl-test-indent-exp),
(cperl-test-indent-styles),
(cperl-test-bug-30393): Use the new macro.
(cperl-test-bug-19709): Make fit for Emacs 26.
(cperl-test-indent-styles): Skip for Perl mode (bug#44561).
Stefan Monnier [Wed, 11 Nov 2020 04:26:28 +0000 (23:26 -0500)]
* lisp/server.el: Refactor frame creation functions
(server--create-frame): New function, extracted from
`server-create-dumb-terminal-frame`.
(server-create-window-system-frame, server-create-tty-frame):
(server-create-dumb-terminal-frame): Use it.
Eliza Velasquez [Wed, 11 Nov 2020 03:14:03 +0000 (22:14 -0500)]
* lisp/server.el: Fix frame creation on dumb terminals (bug#25547)
(server-create-dumb-terminal-frame): New function.
(server-process-filter): Use it.
(server-delete-client): Don't delete tty terminal when it's not
exclusive to this client.
Juri Linkov [Tue, 10 Nov 2020 19:27:37 +0000 (21:27 +0200)]
Don't set file name variable in org-element-parse-secondary-string (bug#44524)
* lisp/org/org-element.el (org-element-parse-secondary-string):
Don't set buffer-local variables buffer-file-name and buffer-file-truename
in temporary buffer.
Juri Linkov [Tue, 10 Nov 2020 19:21:18 +0000 (21:21 +0200)]
* lisp/leim/quail/compose.el ("iso-transl"): New input method.
* doc/emacs/basic.texi (Inserting Text):
Mention transient input method "iso-transl".
* lisp/leim/quail/latin-ltx.el: Use same Keywords as in other quail files.
Eli Zaretskii [Tue, 10 Nov 2020 17:41:04 +0000 (19:41 +0200)]
New debugging command 'malloc-info'
* src/alloc.c (Fmalloc_info) [GNU_LINUX]: New command.
(syms_of_alloc): Defsubr it. (Bug#43389)
Dmitry Gutov [Tue, 10 Nov 2020 16:08:13 +0000 (18:08 +0200)]
Clear the vc-state cache when returning nil
* lisp/vc/vc-hg.el (vc-hg-registered):
Clear the vc-state cache when returning nil.
Tom Fitzhenry [Mon, 9 Nov 2020 11:19:10 +0000 (22:19 +1100)]
Remove extra process call from vc-hg-registered
Prefer vc-state to benefit from its caching (bug#44534)
This same technique is used in vc-git.el,
per commit 2018-06-28 "Remove extra process call from vc-git-find-file-hook"
93c41ce6aa64b14fc9bd7bdd0d909915a79191cd.
* lisp/vc/vc-hg.el (vc-hg-registered): Use vc-state rather than vc-hg-state.
Eli Zaretskii [Tue, 10 Nov 2020 15:06:46 +0000 (17:06 +0200)]
Fix a recent change in image.c for MS-Windows
* src/image.c: Fix DEF_DLL_FN of
rsvg_handle_get_intrinsic_dimensions. Reported by Andy Moreton
<andrewjmoreton@gmail.com>.
Lars Ingebrigtsen [Tue, 10 Nov 2020 13:53:03 +0000 (14:53 +0100)]
Add more doc-view requirements
* lisp/doc-view.el: Add more requirements.
Steven Allen [Tue, 10 Nov 2020 09:02:15 +0000 (10:02 +0100)]
Only use nbutlast when we actually want to modify the original list
* lisp/net/tramp-gvfs.el (tramp-gvfs-dbus-byte-array-to-string):
Don't modify the byte array.
* lisp/net/tramp-integration.el (tramp-eshell-directory-change):
Don't modify the underlying exec-path.
Andrew G Cohen [Tue, 10 Nov 2020 00:19:43 +0000 (08:19 +0800)]
Remove ephemeral group on error or null result
* lisp/gnus/nnselect.el (nnselect-request-group): If an ephemeral
group is empty, there is nothing to see, so remove the group.
(nnselect-run): Catch and return an empty artlist on error.
Alan Mackenzie [Mon, 9 Nov 2020 21:19:19 +0000 (21:19 +0000)]
CC Mode: fix many compiler warnings which would appear with lexical binding
* lisp/progmodes/cc-align.el (three places) prefix langelem with a _.
* lisp/progmodes/cc-{cmds,engine}.el: Remove superfluous local variables.
* lisp/progmodes/cc-defs.el (c-will-be-unescaped): Remove unused parameter
end.
* lisp/progmodes/cc-engine.el (c-looking-at-decl-block): Remove unused
parameter containing-sexp.
(c-looking-at-special-brace-list); Remove unused parameter lim.
(c-add-class-syntax): Remove unused parameter paren-state.
Philipp Stephani [Mon, 9 Nov 2020 21:14:39 +0000 (22:14 +0100)]
Fix undefined behavior when fetching glyphs from the display vector.
You can trigger this rather obscure bug by enabling selective display
if the second glyph in its display vector has an invalid face. For
example, evaluate
(set-display-table-slot standard-display-table
'selective-display [?A (?B . invalid)])
and then enable selective display.
* src/xdisp.c (next_element_from_display_vector): Check whether next
glyph code is valid before accessing it.
Stefan Kangas [Mon, 9 Nov 2020 20:43:53 +0000 (21:43 +0100)]
Add test for substitute-command-keys with command remap
* test/lisp/help-tests.el (help-tests-remap-map): New variable.
(help-tests-substitute-command-keys/remap): New test.
(help-tests-substitute-command-keys/keymaps)
(help-tests-substitute-command-keys/undefined-map): Fix indentation.
Brian Leung [Mon, 9 Nov 2020 16:38:18 +0000 (08:38 -0800)]
shortdoc: prefer seq-contains-p over seq-contains
* lisp/emacs-lisp/shortdoc.el (sequence): use seq-contains-p instead
of seq-contains, which is obsolete as of 27.1. (Bug#44536)
Copyright-paperwork-exempt: yes
Stefan Kangas [Thu, 5 Nov 2020 14:32:45 +0000 (15:32 +0100)]
Simplify getting value of text-quoting-style (Bug#44471)
* src/doc.c (text_quoting_style): Remove function by merging it...
(Ftext_quoting_style): ...here. Rename from Fget_quoting_style.
(syms_of_doc): Update defsubr for Ftext_quoting_style.
* src/lisp.h (enum text_quoting_style): Remove enum.
* src/doprnt.c (doprnt):
* src/editfns.c (styled_format):
* lisp/help.el (substitute-command-keys): Update callers to use
text-quoting-style.
Philipp Stephani [Mon, 9 Nov 2020 17:15:12 +0000 (18:15 +0100)]
* lisp/disp-table.el (make-glyph-code): Remove obsolete comment.
Mattias Engdegård [Mon, 9 Nov 2020 17:05:08 +0000 (18:05 +0100)]
Better warning suppression in rx-tests
* test/lisp/emacs-lisp/rx-tests.el (rx-compat): Use with-no-warnings
instead of with-suppressed-warnings which complains when running
the test interactively.
Mattias Engdegård [Mon, 9 Nov 2020 16:11:05 +0000 (17:11 +0100)]
Fix pcase rx form snag with '?' and '??' (bug#44532)
This is a regression from Emacs 26.
Reported by Phillip Stephani.
* lisp/emacs-lisp/rx.el (rx--pcase-transform): Process ? and ?? correctly.
* test/lisp/emacs-lisp/rx-tests.el (rx-pcase): Add test case.
(cherry picked from commit
575b0681d926463960fc00d1e33decaa71d5c956)
Mattias Engdegård [Mon, 9 Nov 2020 16:11:05 +0000 (17:11 +0100)]
Fix pcase rx form snag with '?' and '??' (bug#44532)
This is a regression from Emacs 26.
Reported by Phillip Stephani.
* lisp/emacs-lisp/rx.el (rx--pcase-transform): Process ? and ?? correctly.
* test/lisp/emacs-lisp/rx-tests.el (rx-pcase): Add test case.